import VToast from '@/lib/components/v-toast/VToast'

let Toast = {}
Toast.install = function (Vue) {
  Vue.prototype.$toast = {
    show(options) {
      let vToastCompoent = Vue.extend(VToast)
      let $vm = new vToastCompoent()
      let el = $vm.$mount().$el
      document.body.appendChild(el)
      $vm.contentHtml = options
    }
  }
}

export default Toast
